import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import main from '@/components/main'
import home from '@/components/home/home'
import personInfo from '@/components/personInfo/personInfo'
import setting from '@/components/setting/setting'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path:'/',
      name:'main',
      component:main,
      children: [
        {
          path: 'home',
          name: 'home',
          component: home
        },
        {
          path: 'personInfo',
          name: 'personInfo',
          component: personInfo
        },
        {
          path: 'setting',
          name: 'setting',
          component: setting
        }
      ]
    }

  ]
})
